xen/shim: stash RSDP address for ACPI driver
authorWei Liu <wei.liu2@citrix.com>
Mon, 22 Jan 2018 16:28:30 +0000 (16:28 +0000)
committerWei Liu <wei.liu2@citrix.com>
Mon, 22 Jan 2018 17:29:53 +0000 (17:29 +0000)
It used to the case that we placed RSDP under 1MB and let Xen search
for it. We moved the placement to under 4GB in 4a5733771, so the
search wouldn't work.

Introduce rsdp_hint to ACPI code and set that variable in
convert_pvh_info.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/guest/pvh-boot.c
xen/drivers/acpi/osl.c
xen/include/xen/acpi.h

index be3122b16ce7deda9b64de66c0a6f83e0191cea9..0e9e5bfdf6e3ce959c51d0c57ef3b7415f6849d0 100644 (file)
@@ -69,6 +69,9 @@ static void __init convert_pvh_info(void)
         mod[i].mod_end   = entry[i].paddr + entry[i].size;
         mod[i].string    = entry[i].cmdline_paddr;
     }
+
+    BUG_ON(!pvh_info->rsdp_paddr);
+    rsdp_hint = pvh_info->rsdp_paddr;
 }
 
 static void __init get_memory_map(void)
index 52c9b4ba9a59a27df799f2bb69764951ffdc089b..4c8bb7839edab0234ea1babf6a00ea154c1530c4 100644 (file)
@@ -62,8 +62,13 @@ void __init acpi_os_vprintf(const char *fmt, va_list args)
        printk("%s", buffer);
 }
 
+acpi_physical_address __initdata rsdp_hint;
+
 acpi_physical_address __init acpi_os_get_root_pointer(void)
 {
+       if (rsdp_hint)
+               return rsdp_hint;
+
        if (efi_enabled(EFI_BOOT)) {
                if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
                        return efi.acpi20;
index 9409350f05d80601dc87ca64dcb8c7a1c8ec28b3..fd5b5fb919e26ab06202aae789f7fab58cd27dce 100644 (file)
@@ -51,6 +51,8 @@
 
 #ifdef CONFIG_ACPI
 
+extern acpi_physical_address rsdp_hint;
+
 enum acpi_interrupt_id {
        ACPI_INTERRUPT_PMI      = 1,
        ACPI_INTERRUPT_INIT,